package skewreduce.framework.physical;

import org.apache.hadoop.fs.Path;

import skewreduce.framework.logical.LogicalOp;


public abstract class PSampleOp extends PhysicalOp {
	@Override
	protected Path getOutputByContext(PhysicalOp op) {
		if ( op.getType() != LogicalOp.Type.PARTITION )
			throw new IllegalArgumentException("sampler must be followed by partition");
		assert input.size() == 1;	// there is always a single input
		return input.get(0);
	}
}